﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    Inherits="CallRoute_Customer_Coverage_Assignment" CodeFile="Customer_Coverage_Assignment.aspx.cs" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <title>客户分配维护</title>
    <script src="../JavaScript/empchecks.js" type="text/javascript"></script>
    <script src="../JavaScript/common.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <table id="wsd_inputtable" style="text-align: left;">
            <tr>
                <td class="tabletitle" colspan="4">
                    查询条件
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    部门&nbsp;&nbsp; :
                </td>
                <td>
                    <asp:TextBox ID="txtOrg" class="default" runat="server" onkeydown="alert('请选择部门');return false;"
                        Width="145" OnTextChanged="txtOrg_TextChanged"></asp:TextBox>
                    <img src="../Resources/Images/search.png" alt="查找" style="cursor: pointer;" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&SelectType=single','','300','500');" />
                    <input id="txtHidOrg" type="hidden" runat="server" />
                </td>
                <td class="tablefield">
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    原巡店督导:
                </td>
                <td>
                    <asp:DropDownList ID="ddlOldUser" runat="server" Width="147" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlOldUser_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <span lang="zh-cn">新巡店督导:</span>
                </td>
                <td>
                    <asp:DropDownList ID="ddlNewUser" runat="server" Width="145">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="原巡店督导不能为空"
                        ControlToValidate="ddlOldUser"></asp:RequiredFieldValidator>
                </td>
                <td colspan="2" style="text-align: center">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="新巡店督导不能为空"
                        ControlToValidate="ddlNewUser"></asp:RequiredFieldValidator>
                    <asp:CompareValidator runat="server" ID="cvdUserValue" ControlToCompare="ddlOldUser"
                        ControlToValidate="ddlNewUser" ErrorMessage="不能转移给自己" Operator="NotEqual" Type="String">
                    </asp:CompareValidator>
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    原巡店督导客户列表
                </td>
            </tr>
        </table>
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView Width="100%" ID="gvChannelType" runat="server" AutoGenerateColumns="false"
                        EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" BorderWidth="0"  GridLines="None"
                        EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="Grid_RowDataBound"
                        EnableEmptyContentRender="true" DataKeyNames="ID,RCID" AllowPaging="True" PageSize="30"
                        OnPageIndexChanging="gvChannelType_PageIndexChanging">
                        <HeaderStyle HorizontalAlign="Center" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                            <asp:TemplateField HeaderText="客户代码">
                                <ItemTemplate>
                                    <%# Eval("CODE")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="门店名称">
                                <ItemTemplate>
                                    <%# Eval("NAME")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="区域层次" DataField="Level" />
                            <asp:BoundField HeaderText="经销商" DataField="Chain" Visible="false" />
                            <asp:BoundField HeaderText="连锁门店" DataField="Banner" Visible="false" />
                            <asp:BoundField HeaderText="客户类型" DataField="CustomerClass" />
                            <asp:BoundField HeaderText="销售渠道" DataField="Channel" />
                            <asp:BoundField HeaderText="地址" DataField="ADDRESS_LINE" />
                            <asp:BoundField HeaderText="电话" DataField="TELEPHONE" />
                            <asp:BoundField HeaderText="传真" DataField="FAX" />
                            <asp:TemplateField HeaderText="选择">
                                <HeaderTemplate>
                                    <input type="checkbox" id="chkAll" name="chkAll" onclick="CheckAll('gvChannelType',this,'cbxIsSelect')" />选择
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="cbxIsSelect" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast" PageButtonCount="30" />
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="btnAdd" runat="server" class="wsd_button2" Text="转移..." OnClick="btnAdd_Click" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
